import java.util.Comparator;

public class Alg<T extends Comparable<T>> {
    public T max(T[] array){
        T max = (T) array[0];
        for (int i = 1; i < array.length; i++) {
            if(((T)array[i]).compareTo(max) > 0){
                max = (T) array[i];
            }
        }
        return max;
    }
}
